home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-02 | 993 b | 36 lines | [TEXT/GEOL] |
- Item 4288616 2-March-90 05:44PST
-
- From: NAUTIL France - Dev, Nautil Info Lyon,IDV
-
- To: CPLUS.APPLE$ C++ Interest List--Apple Employees
- CPLUS.DEV$ C++ Interest List--Developers
-
- Sub: pure base again
-
- Sorry,
-
- I had oversimplified my last complain about ambigious operator new. It's
- abvious that a private base shares its operators.
-
- Really, I have defined a class :
-
- class TNoAllocation {
- public:
- void* operator new(size_t) { return nil; }
- void operator delete(void*) { }
- };
-
- then I have modified TPureBase to :
-
- class TPureBase : private TNoAllocation {
- public:
- TPureBase(int) {}
- };
-
- and I have derivated class A and B from public bases TxSpecialAlloc and
- TPureBase. I don't understand why operator new is ambigious for A or B. I think
- that the only operator that can be seen by A or B is TxSpecialAlloc::new.
-
- Etienne Vautherin
-
-